//===----------------------------------------------------------------------===//
//
// This source file is part of the Soto for AWS open source project
//
// Copyright (c) 2017-2024 the Soto project authors
// Licensed under Apache License v2.0
//
// See LICENSE.txt for license information
// See CONTRIBUTORS.txt for the list of Soto project authors
//
// SPDX-License-Identifier: Apache-2.0
//
//===----------------------------------------------------------------------===//

// THIS FILE IS AUTOMATICALLY GENERATED by https://github.com/soto-project/soto-codegenerator.
// DO NOT EDIT.

#if canImport(FoundationEssentials)
import FoundationEssentials
#else
import Foundation
#endif
@_exported import SotoCore

/// Service object for interacting with AWS S3Vectors service.
///
/// Amazon S3 vector buckets are a bucket type to store and search vectors with sub-second search times. They are designed to provide dedicated API operations for you to interact with vectors to do similarity search. Within a vector bucket, you use a vector index to organize and logically group your vector data. When you make a write or read request, you direct it to a single vector index. You store your vector data as vectors. A vector contains a key (a name that you assign), a multi-dimensional vector, and, optionally, metadata that describes a vector. The key uniquely identifies the vector in a vector index.
public struct S3Vectors: AWSService {
    // MARK: Member variables

    /// Client used for communication with AWS
    public let client: AWSClient
    /// Service configuration
    public let config: AWSServiceConfig

    // MARK: Initialization

    /// Initialize the S3Vectors client
    /// - parameters:
    ///     - client: AWSClient used to process requests
    ///     - region: Region of server you want to communicate with. This will override the partition parameter.
    ///     - partition: AWS partition where service resides, standard (.aws), china (.awscn), government (.awsusgov).
    ///     - endpoint: Custom endpoint URL to use instead of standard AWS servers
    ///     - middleware: Middleware chain used to edit requests before they are sent and responses before they are decoded 
    ///     - timeout: Timeout value for HTTP requests
    ///     - byteBufferAllocator: Allocator for ByteBuffers
    ///     - options: Service options
    public init(
        client: AWSClient,
        region: SotoCore.Region? = nil,
        partition: AWSPartition = .aws,
        endpoint: String? = nil,
        middleware: AWSMiddlewareProtocol? = nil,
        timeout: TimeAmount? = nil,
        byteBufferAllocator: ByteBufferAllocator = ByteBufferAllocator(),
        options: AWSServiceConfig.Options = []
    ) {
        self.client = client
        self.config = AWSServiceConfig(
            region: region,
            partition: region?.partition ?? partition,
            serviceName: "S3Vectors",
            serviceIdentifier: "s3vectors",
            serviceProtocol: .restjson,
            apiVersion: "2025-07-15",
            endpoint: endpoint,
            errorType: S3VectorsErrorType.self,
            middleware: middleware,
            timeout: timeout,
            byteBufferAllocator: byteBufferAllocator,
            options: options
        )
    }





    // MARK: API Calls

    ///  Amazon S3 Vectors is in preview release for Amazon S3 and is subject to change.  Creates a vector index within a vector bucket. To specify the vector bucket, you must use either the vector bucket name or the vector bucket Amazon Resource Name (ARN).  Permissions  You must have the s3vectors:CreateIndex permission to use this operation.
    @Sendable
    @inlinable
    public func createIndex(_ input: CreateIndexInput, logger: Logger = AWSClient.loggingDisabled) async throws -> CreateIndexOutput {
        try await self.client.execute(
            operation: "CreateIndex", 
            path: "/CreateIndex", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    ///  Amazon S3 Vectors is in preview release for Amazon S3 and is subject to change.  Creates a vector index within a vector bucket. To specify the vector bucket, you must use either the vector bucket name or the vector bucket Amazon Resource Name (ARN).  Permissions  You must have the s3vectors:CreateIndex permission to use this operation.
    ///
    /// Parameters:
    ///   - dataType: The data type of the vectors to be inserted into the vector index.
    ///   - dimension: The dimensions of the vectors to be inserted into the vector index.
    ///   - distanceMetric: The distance metric to be used for similarity search.
    ///   - indexName: The name of the vector index to create.
    ///   - metadataConfiguration: The metadata configuration for the vector index.
    ///   - vectorBucketArn: The Amazon Resource Name (ARN) of the vector bucket to create the vector index in.
    ///   - vectorBucketName: The name of the vector bucket to create the vector index in.
    ///   - logger: Logger use during operation
    @inlinable
    public func createIndex(
        dataType: DataType,
        dimension: Int,
        distanceMetric: DistanceMetric,
        indexName: String,
        metadataConfiguration: MetadataConfiguration? = nil,
        vectorBucketArn: String? = nil,
        vectorBucketName: String? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> CreateIndexOutput {
        let input = CreateIndexInput(
            dataType: dataType, 
            dimension: dimension, 
            distanceMetric: distanceMetric, 
            indexName: indexName, 
            metadataConfiguration: metadataConfiguration, 
            vectorBucketArn: vectorBucketArn, 
            vectorBucketName: vectorBucketName
        )
        return try await self.createIndex(input, logger: logger)
    }

    ///  Amazon S3 Vectors is in preview release for Amazon S3 and is subject to change.  Creates a vector bucket in the Amazon Web Services Region that you want your bucket to be in.   Permissions  You must have the s3vectors:CreateVectorBucket permission to use this operation.
    @Sendable
    @inlinable
    public func createVectorBucket(_ input: CreateVectorBucketInput, logger: Logger = AWSClient.loggingDisabled) async throws -> CreateVectorBucketOutput {
        try await self.client.execute(
            operation: "CreateVectorBucket", 
            path: "/CreateVectorBucket", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    ///  Amazon S3 Vectors is in preview release for Amazon S3 and is subject to change.  Creates a vector bucket in the Amazon Web Services Region that you want your bucket to be in.   Permissions  You must have the s3vectors:CreateVectorBucket permission to use this operation.
    ///
    /// Parameters:
    ///   - encryptionConfiguration: The encryption configuration for the vector bucket. By default, if you don't specify, all new vectors in Amazon S3 vector buckets use server-side encryption with Amazon S3 managed keys (SSE-S3), specifically AES256.
    ///   - vectorBucketName: The name of the vector bucket to create.
    ///   - logger: Logger use during operation
    @inlinable
    public func createVectorBucket(
        encryptionConfiguration: EncryptionConfiguration? = nil,
        vectorBucketName: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> CreateVectorBucketOutput {
        let input = CreateVectorBucketInput(
            encryptionConfiguration: encryptionConfiguration, 
            vectorBucketName: vectorBucketName
        )
        return try await self.createVectorBucket(input, logger: logger)
    }

    ///  Amazon S3 Vectors is in preview release for Amazon S3 and is subject to change.  Deletes a vector index. To specify the vector index, you can either use both the vector bucket name and vector index name, or use the vector index Amazon Resource Name (ARN).   Permissions  You must have the s3vectors:DeleteIndex permission to use this operation.
    @Sendable
    @inlinable
    public func deleteIndex(_ input: DeleteIndexInput, logger: Logger = AWSClient.loggingDisabled) async throws -> DeleteIndexOutput {
        try await self.client.execute(
            operation: "DeleteIndex", 
            path: "/DeleteIndex", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    ///  Amazon S3 Vectors is in preview release for Amazon S3 and is subject to change.  Deletes a vector index. To specify the vector index, you can either use both the vector bucket name and vector index name, or use the vector index Amazon Resource Name (ARN).   Permissions  You must have the s3vectors:DeleteIndex permission to use this operation.
    ///
    /// Parameters:
    ///   - indexArn: The ARN of the vector index to delete.
    ///   - indexName: The name of the vector index to delete.
    ///   - vectorBucketName: The name of the vector bucket that contains the vector index.
    ///   - logger: Logger use during operation
    @inlinable
    public func deleteIndex(
        indexArn: String? = nil,
        indexName: String? = nil,
        vectorBucketName: String? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> DeleteIndexOutput {
        let input = DeleteIndexInput(
            indexArn: indexArn, 
            indexName: indexName, 
            vectorBucketName: vectorBucketName
        )
        return try await self.deleteIndex(input, logger: logger)
    }

    ///  Amazon S3 Vectors is in preview release for Amazon S3 and is subject to change.  Deletes a vector bucket. All vector indexes in the vector bucket must be deleted before the vector bucket can be deleted. To perform this operation, you must use either the vector bucket name or the vector bucket Amazon Resource Name (ARN).   Permissions  You must have the s3vectors:DeleteVectorBucket permission to use this operation.
    @Sendable
    @inlinable
    public func deleteVectorBucket(_ input: DeleteVectorBucketInput, logger: Logger = AWSClient.loggingDisabled) async throws -> DeleteVectorBucketOutput {
        try await self.client.execute(
            operation: "DeleteVectorBucket", 
            path: "/DeleteVectorBucket", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    ///  Amazon S3 Vectors is in preview release for Amazon S3 and is subject to change.  Deletes a vector bucket. All vector indexes in the vector bucket must be deleted before the vector bucket can be deleted. To perform this operation, you must use either the vector bucket name or the vector bucket Amazon Resource Name (ARN).   Permissions  You must have the s3vectors:DeleteVectorBucket permission to use this operation.
    ///
    /// Parameters:
    ///   - vectorBucketArn: The ARN of the vector bucket to delete.
    ///   - vectorBucketName: The name of the vector bucket to delete.
    ///   - logger: Logger use during operation
    @inlinable
    public func deleteVectorBucket(
        vectorBucketArn: String? = nil,
        vectorBucketName: String? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> DeleteVectorBucketOutput {
        let input = DeleteVectorBucketInput(
            vectorBucketArn: vectorBucketArn, 
            vectorBucketName: vectorBucketName
        )
        return try await self.deleteVectorBucket(input, logger: logger)
    }

    ///  Amazon S3 Vectors is in preview release for Amazon S3 and is subject to change.  Deletes a vector bucket policy. To specify the bucket, you must use either the vector bucket name or the vector bucket Amazon Resource Name (ARN).  Permissions  You must have the s3vectors:DeleteVectorBucketPolicy permission to use this operation.
    @Sendable
    @inlinable
    public func deleteVectorBucketPolicy(_ input: DeleteVectorBucketPolicyInput, logger: Logger = AWSClient.loggingDisabled) async throws -> DeleteVectorBucketPolicyOutput {
        try await self.client.execute(
            operation: "DeleteVectorBucketPolicy", 
            path: "/DeleteVectorBucketPolicy", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    ///  Amazon S3 Vectors is in preview release for Amazon S3 and is subject to change.  Deletes a vector bucket policy. To specify the bucket, you must use either the vector bucket name or the vector bucket Amazon Resource Name (ARN).  Permissions  You must have the s3vectors:DeleteVectorBucketPolicy permission to use this operation.
    ///
    /// Parameters:
    ///   - vectorBucketArn: The ARN of the vector bucket to delete the policy from.
    ///   - vectorBucketName: The name of the vector bucket to delete the policy from.
    ///   - logger: Logger use during operation
    @inlinable
    public func deleteVectorBucketPolicy(
        vectorBucketArn: String? = nil,
        vectorBucketName: String? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> DeleteVectorBucketPolicyOutput {
        let input = DeleteVectorBucketPolicyInput(
            vectorBucketArn: vectorBucketArn, 
            vectorBucketName: vectorBucketName
        )
        return try await self.deleteVectorBucketPolicy(input, logger: logger)
    }

    ///  Amazon S3 Vectors is in preview release for Amazon S3 and is subject to change.  Deletes one or more vectors in a vector index. To specify the vector index, you can either use both the vector bucket name and vector index name, or use the vector index Amazon Resource Name (ARN).   Permissions  You must have the s3vectors:DeleteVectors permission to use this operation.
    @Sendable
    @inlinable
    public func deleteVectors(_ input: DeleteVectorsInput, logger: Logger = AWSClient.loggingDisabled) async throws -> DeleteVectorsOutput {
        try await self.client.execute(
            operation: "DeleteVectors", 
            path: "/DeleteVectors", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    ///  Amazon S3 Vectors is in preview release for Amazon S3 and is subject to change.  Deletes one or more vectors in a vector index. To specify the vector index, you can either use both the vector bucket name and vector index name, or use the vector index Amazon Resource Name (ARN).   Permissions  You must have the s3vectors:DeleteVectors permission to use this operation.
    ///
    /// Parameters:
    ///   - indexArn: The ARN of the vector index that contains a vector you want to delete.
    ///   - indexName: The name of the vector index that contains a vector you want to delete.
    ///   - keys: The keys of the vectors to delete.
    ///   - vectorBucketName: The name of the vector bucket that contains the vector index.
    ///   - logger: Logger use during operation
    @inlinable
    public func deleteVectors(
        indexArn: String? = nil,
        indexName: String? = nil,
        keys: [String],
        vectorBucketName: String? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> DeleteVectorsOutput {
        let input = DeleteVectorsInput(
            indexArn: indexArn, 
            indexName: indexName, 
            keys: keys, 
            vectorBucketName: vectorBucketName
        )
        return try await self.deleteVectors(input, logger: logger)
    }

    ///  Amazon S3 Vectors is in preview release for Amazon S3 and is subject to change.  Returns vector index attributes. To specify the vector index, you can either use both the vector bucket name and the vector index name, or use the vector index Amazon Resource Name (ARN).   Permissions  You must have the s3vectors:GetIndex permission to use this operation.
    @Sendable
    @inlinable
    public func getIndex(_ input: GetIndexInput, logger: Logger = AWSClient.loggingDisabled) async throws -> GetIndexOutput {
        try await self.client.execute(
            operation: "GetIndex", 
            path: "/GetIndex", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    ///  Amazon S3 Vectors is in preview release for Amazon S3 and is subject to change.  Returns vector index attributes. To specify the vector index, you can either use both the vector bucket name and the vector index name, or use the vector index Amazon Resource Name (ARN).   Permissions  You must have the s3vectors:GetIndex permission to use this operation.
    ///
    /// Parameters:
    ///   - indexArn: The ARN of the vector index.
    ///   - indexName: The name of the vector index.
    ///   - vectorBucketName: The name of the vector bucket that contains the vector index.
    ///   - logger: Logger use during operation
    @inlinable
    public func getIndex(
        indexArn: String? = nil,
        indexName: String? = nil,
        vectorBucketName: String? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> GetIndexOutput {
        let input = GetIndexInput(
            indexArn: indexArn, 
            indexName: indexName, 
            vectorBucketName: vectorBucketName
        )
        return try await self.getIndex(input, logger: logger)
    }

    ///  Amazon S3 Vectors is in preview release for Amazon S3 and is subject to change.  Returns vector bucket attributes. To specify the bucket, you must use either the vector bucket name or the vector bucket Amazon Resource Name (ARN).   Permissions  You must have the s3vectors:GetVectorBucket permission to use this operation.
    @Sendable
    @inlinable
    public func getVectorBucket(_ input: GetVectorBucketInput, logger: Logger = AWSClient.loggingDisabled) async throws -> GetVectorBucketOutput {
        try await self.client.execute(
            operation: "GetVectorBucket", 
            path: "/GetVectorBucket", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    ///  Amazon S3 Vectors is in preview release for Amazon S3 and is subject to change.  Returns vector bucket attributes. To specify the bucket, you must use either the vector bucket name or the vector bucket Amazon Resource Name (ARN).   Permissions  You must have the s3vectors:GetVectorBucket permission to use this operation.
    ///
    /// Parameters:
    ///   - vectorBucketArn: The ARN of the vector bucket to retrieve information about.
    ///   - vectorBucketName: The name of the vector bucket to retrieve information about.
    ///   - logger: Logger use during operation
    @inlinable
    public func getVectorBucket(
        vectorBucketArn: String? = nil,
        vectorBucketName: String? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> GetVectorBucketOutput {
        let input = GetVectorBucketInput(
            vectorBucketArn: vectorBucketArn, 
            vectorBucketName: vectorBucketName
        )
        return try await self.getVectorBucket(input, logger: logger)
    }

    ///  Amazon S3 Vectors is in preview release for Amazon S3 and is subject to change.  Gets details about a vector bucket policy. To specify the bucket, you must use either the vector bucket name or the vector bucket Amazon Resource Name (ARN).   Permissions  You must have the s3vectors:GetVectorBucketPolicy permission to use this operation.
    @Sendable
    @inlinable
    public func getVectorBucketPolicy(_ input: GetVectorBucketPolicyInput, logger: Logger = AWSClient.loggingDisabled) async throws -> GetVectorBucketPolicyOutput {
        try await self.client.execute(
            operation: "GetVectorBucketPolicy", 
            path: "/GetVectorBucketPolicy", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    ///  Amazon S3 Vectors is in preview release for Amazon S3 and is subject to change.  Gets details about a vector bucket policy. To specify the bucket, you must use either the vector bucket name or the vector bucket Amazon Resource Name (ARN).   Permissions  You must have the s3vectors:GetVectorBucketPolicy permission to use this operation.
    ///
    /// Parameters:
    ///   - vectorBucketArn: The ARN of the vector bucket.
    ///   - vectorBucketName: The name of the vector bucket.
    ///   - logger: Logger use during operation
    @inlinable
    public func getVectorBucketPolicy(
        vectorBucketArn: String? = nil,
        vectorBucketName: String? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> GetVectorBucketPolicyOutput {
        let input = GetVectorBucketPolicyInput(
            vectorBucketArn: vectorBucketArn, 
            vectorBucketName: vectorBucketName
        )
        return try await self.getVectorBucketPolicy(input, logger: logger)
    }

    ///  Amazon S3 Vectors is in preview release for Amazon S3 and is subject to change.  Returns vector attributes. To specify the vector index, you can either use both the vector bucket name and the vector index name, or use the vector index Amazon Resource Name (ARN).   Permissions  You must have the s3vectors:GetVectors permission to use this operation.
    @Sendable
    @inlinable
    public func getVectors(_ input: GetVectorsInput, logger: Logger = AWSClient.loggingDisabled) async throws -> GetVectorsOutput {
        try await self.client.execute(
            operation: "GetVectors", 
            path: "/GetVectors", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    ///  Amazon S3 Vectors is in preview release for Amazon S3 and is subject to change.  Returns vector attributes. To specify the vector index, you can either use both the vector bucket name and the vector index name, or use the vector index Amazon Resource Name (ARN).   Permissions  You must have the s3vectors:GetVectors permission to use this operation.
    ///
    /// Parameters:
    ///   - indexArn: The ARN of the vector index.
    ///   - indexName: The name of the vector index.
    ///   - keys: The names of the vectors you want to return attributes for.
    ///   - returnData: Indicates whether to include the vector data in the response. The default value is false.
    ///   - returnMetadata: Indicates whether to include metadata in the response. The default value is false.
    ///   - vectorBucketName: The name of the vector bucket that contains the vector index.
    ///   - logger: Logger use during operation
    @inlinable
    public func getVectors(
        indexArn: String? = nil,
        indexName: String? = nil,
        keys: [String],
        returnData: Bool? = nil,
        returnMetadata: Bool? = nil,
        vectorBucketName: String? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> GetVectorsOutput {
        let input = GetVectorsInput(
            indexArn: indexArn, 
            indexName: indexName, 
            keys: keys, 
            returnData: returnData, 
            returnMetadata: returnMetadata, 
            vectorBucketName: vectorBucketName
        )
        return try await self.getVectors(input, logger: logger)
    }

    ///  Amazon S3 Vectors is in preview release for Amazon S3 and is subject to change.  Returns a list of all the vector indexes within the specified vector bucket. To specify the bucket, you must use either the vector bucket name or the vector bucket Amazon Resource Name (ARN).   Permissions  You must have the s3vectors:ListIndexes permission to use this operation.
    @Sendable
    @inlinable
    public func listIndexes(_ input: ListIndexesInput, logger: Logger = AWSClient.loggingDisabled) async throws -> ListIndexesOutput {
        try await self.client.execute(
            operation: "ListIndexes", 
            path: "/ListIndexes", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    ///  Amazon S3 Vectors is in preview release for Amazon S3 and is subject to change.  Returns a list of all the vector indexes within the specified vector bucket. To specify the bucket, you must use either the vector bucket name or the vector bucket Amazon Resource Name (ARN).   Permissions  You must have the s3vectors:ListIndexes permission to use this operation.
    ///
    /// Parameters:
    ///   - maxResults: The maximum number of items to be returned in the response.
    ///   - nextToken: The previous pagination token.
    ///   - prefix: Limits the response to vector indexes that begin with the specified prefix.
    ///   - vectorBucketArn: The ARN of the vector bucket that contains the vector indexes.
    ///   - vectorBucketName: The name of the vector bucket that contains the vector indexes.
    ///   - logger: Logger use during operation
    @inlinable
    public func listIndexes(
        maxResults: Int? = nil,
        nextToken: String? = nil,
        prefix: String? = nil,
        vectorBucketArn: String? = nil,
        vectorBucketName: String? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> ListIndexesOutput {
        let input = ListIndexesInput(
            maxResults: maxResults, 
            nextToken: nextToken, 
            prefix: prefix, 
            vectorBucketArn: vectorBucketArn, 
            vectorBucketName: vectorBucketName
        )
        return try await self.listIndexes(input, logger: logger)
    }

    ///  Amazon S3 Vectors is in preview release for Amazon S3 and is subject to change.  Returns a list of all the vector buckets that are owned by the authenticated sender of the request.  Permissions  You must have the s3vectors:ListVectorBuckets permission to use this operation.
    @Sendable
    @inlinable
    public func listVectorBuckets(_ input: ListVectorBucketsInput, logger: Logger = AWSClient.loggingDisabled) async throws -> ListVectorBucketsOutput {
        try await self.client.execute(
            operation: "ListVectorBuckets", 
            path: "/ListVectorBuckets", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    ///  Amazon S3 Vectors is in preview release for Amazon S3 and is subject to change.  Returns a list of all the vector buckets that are owned by the authenticated sender of the request.  Permissions  You must have the s3vectors:ListVectorBuckets permission to use this operation.
    ///
    /// Parameters:
    ///   - maxResults: The maximum number of vector buckets to be returned in the response.
    ///   - nextToken: The previous pagination token.
    ///   - prefix: Limits the response to vector buckets that begin with the specified prefix.
    ///   - logger: Logger use during operation
    @inlinable
    public func listVectorBuckets(
        maxResults: Int? = nil,
        nextToken: String? = nil,
        prefix: String? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> ListVectorBucketsOutput {
        let input = ListVectorBucketsInput(
            maxResults: maxResults, 
            nextToken: nextToken, 
            prefix: prefix
        )
        return try await self.listVectorBuckets(input, logger: logger)
    }

    ///  Amazon S3 Vectors is in preview release for Amazon S3 and is subject to change.  List vectors in the specified vector index. To specify the vector index, you can either use both the vector bucket name and the vector index name, or use the vector index Amazon Resource Name (ARN).   ListVectors operations proceed sequentially; however, for faster performance on a large number of vectors in a vector index, applications can request a parallel ListVectors operation by providing the segmentCount and segmentIndex parameters.  Permissions  You must have the s3vectors:ListVectors permission to use this operation. Additional permissions are required based on the request parameters you specify:   With only s3vectors:ListVectors permission, you can list vector keys when returnData and returnMetadata are both set to false or not specified..   If you set returnData or returnMetadata to true, you must have both s3vectors:ListVectors and s3vectors:GetVectors permissions. The request fails with a 403 Forbidden error if you request vector data or metadata without the s3vectors:GetVectors permission.
    @Sendable
    @inlinable
    public func listVectors(_ input: ListVectorsInput, logger: Logger = AWSClient.loggingDisabled) async throws -> ListVectorsOutput {
        try await self.client.execute(
            operation: "ListVectors", 
            path: "/ListVectors", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    ///  Amazon S3 Vectors is in preview release for Amazon S3 and is subject to change.  List vectors in the specified vector index. To specify the vector index, you can either use both the vector bucket name and the vector index name, or use the vector index Amazon Resource Name (ARN).   ListVectors operations proceed sequentially; however, for faster performance on a large number of vectors in a vector index, applications can request a parallel ListVectors operation by providing the segmentCount and segmentIndex parameters.  Permissions  You must have the s3vectors:ListVectors permission to use this operation. Additional permissions are required based on the request parameters you specify:   With only s3vectors:ListVectors permission, you can list vector keys when returnData and returnMetadata are both set to false or not specified..   If you set returnData or returnMetadata to true, you must have both s3vectors:ListVectors and s3vectors:GetVectors permissions. The request fails with a 403 Forbidden error if you request vector data or metadata without the s3vectors:GetVectors permission.
    ///
    /// Parameters:
    ///   - indexArn: The Amazon resource Name (ARN) of the vector index.
    ///   - indexName: The name of the vector index.
    ///   - maxResults: The maximum number of vectors to return on a page. If you don't specify maxResults, the ListVectors operation uses a default value of 500. If the processed dataset size exceeds 1 MB before reaching the maxResults value, the operation stops and returns the vectors that are retrieved up to that point, along with a nextToken that you can use in a subsequent request to retrieve the next set of results.
    ///   - nextToken: Pagination token from a previous request. The value of this field is empty for an initial request.
    ///   - returnData: If true, the vector data of each vector will be included in the response. The default value is false.
    ///   - returnMetadata: If true, the metadata associated with each vector will be included in the response. The default value is false.
    ///   - segmentCount: For a parallel ListVectors request, segmentCount represents the total number of vector segments into which the ListVectors operation will be divided. The value of segmentCount corresponds to the number of application workers that will perform the parallel ListVectors operation. For example, if you want to use four application threads to list vectors in a vector index, specify a segmentCount value of 4.  If you specify a segmentCount value of 1, the ListVectors operation will be sequential rather than parallel. If you specify segmentCount, you must also specify segmentIndex.
    ///   - segmentIndex: For a parallel ListVectors request, segmentIndex is the index of the segment from which to list vectors in the current request. It identifies an individual segment to be listed by an application worker.  Segment IDs are zero-based, so the first segment is always 0. For example, if you want to use four application threads to list vectors in a vector index, then the first thread specifies a segmentIndex value of 0, the second thread specifies 1, and so on.  The value of segmentIndex must be less than the value provided for segmentCount.  If you provide segmentIndex, you must also provide segmentCount.
    ///   - vectorBucketName: The name of the vector bucket.
    ///   - logger: Logger use during operation
    @inlinable
    public func listVectors(
        indexArn: String? = nil,
        indexName: String? = nil,
        maxResults: Int? = nil,
        nextToken: String? = nil,
        returnData: Bool? = nil,
        returnMetadata: Bool? = nil,
        segmentCount: Int? = nil,
        segmentIndex: Int? = nil,
        vectorBucketName: String? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> ListVectorsOutput {
        let input = ListVectorsInput(
            indexArn: indexArn, 
            indexName: indexName, 
            maxResults: maxResults, 
            nextToken: nextToken, 
            returnData: returnData, 
            returnMetadata: returnMetadata, 
            segmentCount: segmentCount, 
            segmentIndex: segmentIndex, 
            vectorBucketName: vectorBucketName
        )
        return try await self.listVectors(input, logger: logger)
    }

    ///  Amazon S3 Vectors is in preview release for Amazon S3 and is subject to change.  Creates a bucket policy for a vector bucket. To specify the bucket, you must use either the vector bucket name or the vector bucket Amazon Resource Name (ARN).   Permissions  You must have the s3vectors:PutVectorBucketPolicy permission to use this operation.
    @Sendable
    @inlinable
    public func putVectorBucketPolicy(_ input: PutVectorBucketPolicyInput, logger: Logger = AWSClient.loggingDisabled) async throws -> PutVectorBucketPolicyOutput {
        try await self.client.execute(
            operation: "PutVectorBucketPolicy", 
            path: "/PutVectorBucketPolicy", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    ///  Amazon S3 Vectors is in preview release for Amazon S3 and is subject to change.  Creates a bucket policy for a vector bucket. To specify the bucket, you must use either the vector bucket name or the vector bucket Amazon Resource Name (ARN).   Permissions  You must have the s3vectors:PutVectorBucketPolicy permission to use this operation.
    ///
    /// Parameters:
    ///   - policy: The JSON that defines the policy. For more information about bucket policies for S3 Vectors, see Managing vector bucket policies in the Amazon S3 User Guide.
    ///   - vectorBucketArn: The Amazon Resource Name (ARN) of the vector bucket.
    ///   - vectorBucketName: The name of the vector bucket.
    ///   - logger: Logger use during operation
    @inlinable
    public func putVectorBucketPolicy(
        policy: String,
        vectorBucketArn: String? = nil,
        vectorBucketName: String? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> PutVectorBucketPolicyOutput {
        let input = PutVectorBucketPolicyInput(
            policy: policy, 
            vectorBucketArn: vectorBucketArn, 
            vectorBucketName: vectorBucketName
        )
        return try await self.putVectorBucketPolicy(input, logger: logger)
    }

    ///  Amazon S3 Vectors is in preview release for Amazon S3 and is subject to change.  Adds one or more vectors to a vector index. To specify the vector index, you can either use both the vector bucket name and the vector index name, or use the vector index Amazon Resource Name (ARN).  For more information about limits, see Limitations and restrictions in the Amazon S3 User Guide.  When inserting vector data into your vector index, you must provide the vector data as float32 (32-bit floating point) values. If you pass higher-precision values to an Amazon Web Services SDK, S3 Vectors converts the values to 32-bit floating point before storing them, and GetVectors, ListVectors, and QueryVectors operations return the float32 values. Different Amazon Web Services SDKs may have different default numeric types, so ensure your vectors are properly formatted as float32 values regardless of which SDK you're using. For example, in Python, use numpy.float32 or explicitly cast your values.   Permissions  You must have the s3vectors:PutVectors permission to use this operation.
    @Sendable
    @inlinable
    public func putVectors(_ input: PutVectorsInput, logger: Logger = AWSClient.loggingDisabled) async throws -> PutVectorsOutput {
        try await self.client.execute(
            operation: "PutVectors", 
            path: "/PutVectors", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    ///  Amazon S3 Vectors is in preview release for Amazon S3 and is subject to change.  Adds one or more vectors to a vector index. To specify the vector index, you can either use both the vector bucket name and the vector index name, or use the vector index Amazon Resource Name (ARN).  For more information about limits, see Limitations and restrictions in the Amazon S3 User Guide.  When inserting vector data into your vector index, you must provide the vector data as float32 (32-bit floating point) values. If you pass higher-precision values to an Amazon Web Services SDK, S3 Vectors converts the values to 32-bit floating point before storing them, and GetVectors, ListVectors, and QueryVectors operations return the float32 values. Different Amazon Web Services SDKs may have different default numeric types, so ensure your vectors are properly formatted as float32 values regardless of which SDK you're using. For example, in Python, use numpy.float32 or explicitly cast your values.   Permissions  You must have the s3vectors:PutVectors permission to use this operation.
    ///
    /// Parameters:
    ///   - indexArn: The ARN of the vector index where you want to write vectors.
    ///   - indexName: The name of the vector index where you want to write vectors.
    ///   - vectorBucketName: The name of the vector bucket that contains the vector index.
    ///   - vectors: The vectors to add to a vector index. The number of vectors in a single request must not exceed the resource capacity, otherwise the request will be rejected with the error ServiceUnavailableException with the error message "Currently unable to handle the request".
    ///   - logger: Logger use during operation
    @inlinable
    public func putVectors(
        indexArn: String? = nil,
        indexName: String? = nil,
        vectorBucketName: String? = nil,
        vectors: [PutInputVector],
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> PutVectorsOutput {
        let input = PutVectorsInput(
            indexArn: indexArn, 
            indexName: indexName, 
            vectorBucketName: vectorBucketName, 
            vectors: vectors
        )
        return try await self.putVectors(input, logger: logger)
    }

    ///  Amazon S3 Vectors is in preview release for Amazon S3 and is subject to change.  Performs an approximate nearest neighbor search query in a vector index using a query vector. By default, it returns the keys of approximate nearest neighbors. You can optionally include the computed distance (between the query vector and each vector in the response), the vector data, and metadata of each vector in the response.  To specify the vector index, you can either use both the vector bucket name and the vector index name, or use the vector index Amazon Resource Name (ARN).   Permissions  You must have the s3vectors:QueryVectors permission to use this operation. Additional permissions are required based on the request parameters you specify:   With only s3vectors:QueryVectors permission, you can retrieve vector keys of approximate nearest neighbors and computed distances between these vectors. This permission is sufficient only when you don't set any metadata filters and don't request vector data or metadata (by keeping the returnMetadata parameter set to false or not specified).   If you specify a metadata filter or set returnMetadata to true, you must have both s3vectors:QueryVectors and s3vectors:GetVectors permissions. The request fails with a 403 Forbidden error if you request metadata filtering, vector data, or metadata without the s3vectors:GetVectors permission.
    @Sendable
    @inlinable
    public func queryVectors(_ input: QueryVectorsInput, logger: Logger = AWSClient.loggingDisabled) async throws -> QueryVectorsOutput {
        try await self.client.execute(
            operation: "QueryVectors", 
            path: "/QueryVectors", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    ///  Amazon S3 Vectors is in preview release for Amazon S3 and is subject to change.  Performs an approximate nearest neighbor search query in a vector index using a query vector. By default, it returns the keys of approximate nearest neighbors. You can optionally include the computed distance (between the query vector and each vector in the response), the vector data, and metadata of each vector in the response.  To specify the vector index, you can either use both the vector bucket name and the vector index name, or use the vector index Amazon Resource Name (ARN).   Permissions  You must have the s3vectors:QueryVectors permission to use this operation. Additional permissions are required based on the request parameters you specify:   With only s3vectors:QueryVectors permission, you can retrieve vector keys of approximate nearest neighbors and computed distances between these vectors. This permission is sufficient only when you don't set any metadata filters and don't request vector data or metadata (by keeping the returnMetadata parameter set to false or not specified).   If you specify a metadata filter or set returnMetadata to true, you must have both s3vectors:QueryVectors and s3vectors:GetVectors permissions. The request fails with a 403 Forbidden error if you request metadata filtering, vector data, or metadata without the s3vectors:GetVectors permission.
    ///
    /// Parameters:
    ///   - filter: Metadata filter to apply during the query. For more information about metadata keys, see Metadata filtering in the Amazon S3 User Guide.
    ///   - indexArn: The ARN of the vector index that you want to query.
    ///   - indexName: The name of the vector index that you want to query.
    ///   - queryVector: The query vector. Ensure that the query vector has the same dimension as the dimension of the vector index that's being queried. For example, if your vector index contains vectors with 384 dimensions, your query vector must also have 384 dimensions.
    ///   - returnDistance: Indicates whether to include the computed distance in the response. The default value is false.
    ///   - returnMetadata: Indicates whether to include metadata in the response. The default value is false.
    ///   - topK: The number of results to return for each query.
    ///   - vectorBucketName: The name of the vector bucket that contains the vector index.
    ///   - logger: Logger use during operation
    @inlinable
    public func queryVectors(
        filter: AWSDocument? = nil,
        indexArn: String? = nil,
        indexName: String? = nil,
        queryVector: VectorData,
        returnDistance: Bool? = nil,
        returnMetadata: Bool? = nil,
        topK: Int,
        vectorBucketName: String? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> QueryVectorsOutput {
        let input = QueryVectorsInput(
            filter: filter, 
            indexArn: indexArn, 
            indexName: indexName, 
            queryVector: queryVector, 
            returnDistance: returnDistance, 
            returnMetadata: returnMetadata, 
            topK: topK, 
            vectorBucketName: vectorBucketName
        )
        return try await self.queryVectors(input, logger: logger)
    }
}

extension S3Vectors {
    /// Initializer required by `AWSService.with(middlewares:timeout:byteBufferAllocator:options)`. You are not able to use this initializer directly as there are not public
    /// initializers for `AWSServiceConfig.Patch`. Please use `AWSService.with(middlewares:timeout:byteBufferAllocator:options)` instead.
    public init(from: S3Vectors, patch: AWSServiceConfig.Patch) {
        self.client = from.client
        self.config = from.config.with(patch: patch)
    }
}

// MARK: Paginators

@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
extension S3Vectors {
    /// Return PaginatorSequence for operation ``listIndexes(_:logger:)``.
    ///
    /// - Parameters:
    ///   - input: Input for operation
    ///   - logger: Logger used for logging
    @inlinable
    public func listIndexesPaginator(
        _ input: ListIndexesInput,
        logger: Logger = AWSClient.loggingDisabled
    ) -> AWSClient.PaginatorSequence<ListIndexesInput, ListIndexesOutput> {
        return .init(
            input: input,
            command: self.listIndexes,
            inputKey: \ListIndexesInput.nextToken,
            outputKey: \ListIndexesOutput.nextToken,
            logger: logger
        )
    }
    /// Return PaginatorSequence for operation ``listIndexes(_:logger:)``.
    ///
    /// - Parameters:
    ///   - maxResults: The maximum number of items to be returned in the response.
    ///   - prefix: Limits the response to vector indexes that begin with the specified prefix.
    ///   - vectorBucketArn: The ARN of the vector bucket that contains the vector indexes.
    ///   - vectorBucketName: The name of the vector bucket that contains the vector indexes.
    ///   - logger: Logger used for logging
    @inlinable
    public func listIndexesPaginator(
        maxResults: Int? = nil,
        prefix: String? = nil,
        vectorBucketArn: String? = nil,
        vectorBucketName: String? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) -> AWSClient.PaginatorSequence<ListIndexesInput, ListIndexesOutput> {
        let input = ListIndexesInput(
            maxResults: maxResults, 
            prefix: prefix, 
            vectorBucketArn: vectorBucketArn, 
            vectorBucketName: vectorBucketName
        )
        return self.listIndexesPaginator(input, logger: logger)
    }

    /// Return PaginatorSequence for operation ``listVectorBuckets(_:logger:)``.
    ///
    /// - Parameters:
    ///   - input: Input for operation
    ///   - logger: Logger used for logging
    @inlinable
    public func listVectorBucketsPaginator(
        _ input: ListVectorBucketsInput,
        logger: Logger = AWSClient.loggingDisabled
    ) -> AWSClient.PaginatorSequence<ListVectorBucketsInput, ListVectorBucketsOutput> {
        return .init(
            input: input,
            command: self.listVectorBuckets,
            inputKey: \ListVectorBucketsInput.nextToken,
            outputKey: \ListVectorBucketsOutput.nextToken,
            logger: logger
        )
    }
    /// Return PaginatorSequence for operation ``listVectorBuckets(_:logger:)``.
    ///
    /// - Parameters:
    ///   - maxResults: The maximum number of vector buckets to be returned in the response.
    ///   - prefix: Limits the response to vector buckets that begin with the specified prefix.
    ///   - logger: Logger used for logging
    @inlinable
    public func listVectorBucketsPaginator(
        maxResults: Int? = nil,
        prefix: String? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) -> AWSClient.PaginatorSequence<ListVectorBucketsInput, ListVectorBucketsOutput> {
        let input = ListVectorBucketsInput(
            maxResults: maxResults, 
            prefix: prefix
        )
        return self.listVectorBucketsPaginator(input, logger: logger)
    }

    /// Return PaginatorSequence for operation ``listVectors(_:logger:)``.
    ///
    /// - Parameters:
    ///   - input: Input for operation
    ///   - logger: Logger used for logging
    @inlinable
    public func listVectorsPaginator(
        _ input: ListVectorsInput,
        logger: Logger = AWSClient.loggingDisabled
    ) -> AWSClient.PaginatorSequence<ListVectorsInput, ListVectorsOutput> {
        return .init(
            input: input,
            command: self.listVectors,
            inputKey: \ListVectorsInput.nextToken,
            outputKey: \ListVectorsOutput.nextToken,
            logger: logger
        )
    }
    /// Return PaginatorSequence for operation ``listVectors(_:logger:)``.
    ///
    /// - Parameters:
    ///   - indexArn: The Amazon resource Name (ARN) of the vector index.
    ///   - indexName: The name of the vector index.
    ///   - maxResults: The maximum number of vectors to return on a page. If you don't specify maxResults, the ListVectors operation uses a default value of 500. If the processed dataset size exceeds 1 MB before reaching the maxResults value, the operation stops and returns the vectors that are retrieved up to that point, along with a nextToken that you can use in a subsequent request to retrieve the next set of results.
    ///   - returnData: If true, the vector data of each vector will be included in the response. The default value is false.
    ///   - returnMetadata: If true, the metadata associated with each vector will be included in the response. The default value is false.
    ///   - segmentCount: For a parallel ListVectors request, segmentCount represents the total number of vector segments into which the ListVectors operation will be divided. The value of segmentCount corresponds to the number of application workers that will perform the parallel ListVectors operation. For example, if you want to use four application threads to list vectors in a vector index, specify a segmentCount value of 4.  If you specify a segmentCount value of 1, the ListVectors operation will be sequential rather than parallel. If you specify segmentCount, you must also specify segmentIndex.
    ///   - segmentIndex: For a parallel ListVectors request, segmentIndex is the index of the segment from which to list vectors in the current request. It identifies an individual segment to be listed by an application worker.  Segment IDs are zero-based, so the first segment is always 0. For example, if you want to use four application threads to list vectors in a vector index, then the first thread specifies a segmentIndex value of 0, the second thread specifies 1, and so on.  The value of segmentIndex must be less than the value provided for segmentCount.  If you provide segmentIndex, you must also provide segmentCount.
    ///   - vectorBucketName: The name of the vector bucket.
    ///   - logger: Logger used for logging
    @inlinable
    public func listVectorsPaginator(
        indexArn: String? = nil,
        indexName: String? = nil,
        maxResults: Int? = nil,
        returnData: Bool? = nil,
        returnMetadata: Bool? = nil,
        segmentCount: Int? = nil,
        segmentIndex: Int? = nil,
        vectorBucketName: String? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) -> AWSClient.PaginatorSequence<ListVectorsInput, ListVectorsOutput> {
        let input = ListVectorsInput(
            indexArn: indexArn, 
            indexName: indexName, 
            maxResults: maxResults, 
            returnData: returnData, 
            returnMetadata: returnMetadata, 
            segmentCount: segmentCount, 
            segmentIndex: segmentIndex, 
            vectorBucketName: vectorBucketName
        )
        return self.listVectorsPaginator(input, logger: logger)
    }
}

extension S3Vectors.ListIndexesInput: AWSPaginateToken {
    @inlinable
    public func usingPaginationToken(_ token: String) -> S3Vectors.ListIndexesInput {
        return .init(
            maxResults: self.maxResults,
            nextToken: token,
            prefix: self.prefix,
            vectorBucketArn: self.vectorBucketArn,
            vectorBucketName: self.vectorBucketName
        )
    }
}

extension S3Vectors.ListVectorBucketsInput: AWSPaginateToken {
    @inlinable
    public func usingPaginationToken(_ token: String) -> S3Vectors.ListVectorBucketsInput {
        return .init(
            maxResults: self.maxResults,
            nextToken: token,
            prefix: self.prefix
        )
    }
}

extension S3Vectors.ListVectorsInput: AWSPaginateToken {
    @inlinable
    public func usingPaginationToken(_ token: String) -> S3Vectors.ListVectorsInput {
        return .init(
            indexArn: self.indexArn,
            indexName: self.indexName,
            maxResults: self.maxResults,
            nextToken: token,
            returnData: self.returnData,
            returnMetadata: self.returnMetadata,
            segmentCount: self.segmentCount,
            segmentIndex: self.segmentIndex,
            vectorBucketName: self.vectorBucketName
        )
    }
}
